import request from '@/utils/request'

// 获取车辆管理表格数据
export const getVehicleListApi = (params) => {
    return request({
        url: '/owners/vehicle',
        method: 'get',
        params
    })
}

// 删除车辆信息
export const delCarInfoApi = (id) => {
    return request({
        url: "/owners/vehicle/" + id,
        method: "delete",
    })
}

// 获取单行汽车信息
export const getCarInfoApi = (id) => {
    return request({
        url: '/owners/vehicle/' + id,
        method: "get"
    })
}

// 添加信息
export const addCarInfoApi = (data) => {
    return request({
        url: '/owners/vehicle',
        method: 'post',
        data
    })
}

// 修改信息
export const editCarInfoApi = (data) => {
    return request({
        url: '/owners/vehicle/' + data.id,
        method: 'put',
        data
    })
}

// 获取房产
export const getBuildListApi = (data) => {
    return request({
        url: "/house/index?building_code=" + data,
        method: "get"
    })
}

// 获取成员列表
export const getMemberListApi = (data) => {
    return request({
        url: "/owners/member?house_code=" + data,
        method: "get"
    })
}
